package com.wnn.demo.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Transient;

import javax.persistence.Column;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
* Created by Mybatis Generator on 2019/10/30
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Job {

    @Id
    @Column(name = "job_id")
    private Integer jobId;

    /**
     * 职位名称
     */
    @Column(name = "job_name")
    private String jobName;

    /**
     * 职称等级（1~5代表父级职位下子集等级）
     */
    @Column(name = "job_rank")
    private Integer jobRank;

    /**
     * 职称基础薪水(jobRank=0的时候 无)
     */
    @Column(name = "average_salary")
    private BigDecimal averageSalary;

    /**
     *启用状态(0停用，1启用)
     */
    @Column(name = "status")
    private Integer status;


    /**
     *类型（0代表 父级职位，1代表子集）
     */
    @Column(name = "type")
    private Integer type;

    /**
     * 职称描述信息
     */
    @Column(name = "info")
    private String info;


    /**
     * 父级职位类型(父级类型默认0)
     */
    @Column(name = "parent_id")
    private Integer parentId;

    /**
     * 创建时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Column(name = "update_time")
    private Date updateTime;



    private List<Job> childrenJob;

}